package cn.burnit.pojo;


import java.util.Date;

public class Book {
    private String id;//书籍id
    private String bookname;//书名
    private String booktype;//类型
    private String author;//作者
    private String translator;//译者
    private String publisher;//出版社
    private Date publish_time;//出版时间
    private float price;//价格
    private int stock;//库存量
    private int outloan;//已结数量

    public Book() {
    }

    public Book(String id, String bookname, String booktype, String author, String translator, String publisher, Date publish_time, float price, int stock,int outloan) {
        this.id = id;
        this.bookname = bookname;
        this.booktype = booktype;
        this.author = author;
        this.translator = translator;
        this.publisher = publisher;
        this.publish_time = publish_time;
        this.price = price;
        this.stock = stock;
        this.outloan=outloan;
    }

    public Book(String bookname, String booktype, String author, String translator, String publisher, Date publish_time, float price, int stock) {
        this.bookname = bookname;
        this.booktype = booktype;
        this.author = author;
        this.translator = translator;
        this.publisher = publisher;
        this.publish_time = publish_time;
        this.price = price;
        this.stock = stock;
    }

    public Book(String bookId, String bookname, String author, String publisher, Date publishtime,float price, int stock) {
        this.id = bookId;
        this.bookname = bookname;
        this.author = author;
        this.publisher = publisher;
        this.publish_time = publishtime;
        this.price = price;
        this.stock = stock;
    }

    public Book(String bookId, int stock,int outloan) {
        this.id=bookId;
        this.stock=stock;
        this.outloan=outloan;
    }

    public Book(String bookId, String bookname, String booktype, String author, String translator, String publisher, java.sql.Date publishtime, float price, int stock) {
        this.id = bookId;
        this.bookname = bookname;
        this.booktype=booktype;
        this.author = author;
        this.translator=translator;
        this.publisher = publisher;
        this.publish_time = publishtime;
        this.price = price;
        this.stock = stock;
    }

    public Book(String bookId, int stock) {
        this.id=bookId;
        this.stock=stock;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getBookname() {
        return bookname;
    }

    public void setBookname(String bookname) {
        this.bookname = bookname;
    }

    public String getBooktype() {
        return booktype;
    }

    public void setBooktype(String booktype) {
        this.booktype = booktype;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getTranslator() {
        return translator;
    }

    public void setTranslator(String translator) {
        this.translator = translator;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public Date getPublish_time() {
        return publish_time;
    }

    public void setPublish_time(Date publish_time) {
        this.publish_time = publish_time;
    }

    public float getPricce() {
        return price;
    }

    public void setPricce(float pricce) {
        this.price = price;
    }

    public int getStock() {
        return stock;
    }

    public void setStock(int stock) {
        this.stock = stock;
    }

    public int getOutloan() {
        return outloan;
    }

    public void setOutloan(int outloan) {
        this.outloan = outloan;
    }

    @Override
    public String toString() {
        return "Book{" +
                "id='" + id + '\'' +
                ", bookname='" + bookname + '\'' +
                ", booktype='" + booktype + '\'' +
                ", author='" + author + '\'' +
                ", translator='" + translator + '\'' +
                ", publisher='" + publisher + '\'' +
                ", publish_time=" + publish_time +
                ", price=" + price +
                ", stock=" + stock +
                ", outloan='" + outloan + '\'' +
                '}';
    }
}
